Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JThh] ip #364

Open
wants to merge 65 commits into
base: master
Choose a base branch
from
Open

[JThh] ip #364

wants to merge 65 commits into from

Conversation

JThh
Copy link

@JThh JThh commented Jan 30, 2023

DukeBro

“Try harder, fail harder, and win harder.” – Myself (source)

What you need to be successful is simply a task manager - helps you take down all your deadlines and not miss any of them.

  • Feature 1: text-based
  • Feature 2: low learning curve
  • Feature 3: fast to pick up and use for programmers

All you need to do is,

  1. download it from here.
  2. double-click it.
  3. add your tasks.
  4. let it manage your tasks for you 😉

And it is FREE!

Features:

  • Managing tasks
  • Managing deadlines
  • Reminders (coming soon)

If you Java programmer, you can use it to practice Java too. Here's the main method:

public class Main {
    public static void main(String[] args) {
        Application.launch(MainApp.class, args);
    }
}

Copy link

@NappySprout NappySprout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code is neatly written and the switch statement is methodic.

The classes present like Task has been abstracted out so splitting them into different files will not be too troublesome and will be easy for you.

DateTimeFormatter read_fmt = DateTimeFormatter.ofPattern("yyyy-MM-dd HHmm");
DateTimeFormatter print_fmt = DateTimeFormatter.ofPattern("MMM dd yyyy");
try {
LocalDate lt = LocalDate.parse(s, read_fmt);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to make the argument more expressive?


@Override
public String toString() {
return "[D]" + super.toString() + " (by: " + by + ")";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To keep it simple you can use string formatting to prevent accumulation of '+' in string concatenation

int i = 461012;
System.out.format("The value of i is: %d%n", i);


public static class Task {
protected String description;
protected boolean isDone;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job at consistent naming of the booleans!

public class Duke {
public static ArrayList<Task> todos = new ArrayList<>();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good naming of arrays and making them plural!

import java.util.Scanner;
import java.io.File;


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remember to separate the files and provide javadoc when you reach the appropriate stages 😄

@@ -96,6 +96,7 @@ public DukeEmptyTaskException (String msg) {
public static String parse_date(String s) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of "parse_date", perhaps you could rename it to "parseDate", which conforms to the coding standard?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants